#define _CRT_SECURE_NO_WARNINGS 1
void reverse(int* nums, int x, int y)
{
	while (x < y)
	{
		int tmp = nums[x];
		nums[x] = nums[y];
		nums[y] = tmp;
		x++;
		y--;
	}

}

void rotate(int* nums, int numsSize, int k)
{
	k %= numsSize;
	reverse(nums, 0, numsSize - k - 1);
	reverse(nums, numsSize - k, numsSize - 1);
	reverse(nums, 0, numsSize - 1);
}

for (int i = 0; i < k; i++)
{

}